package com.dbdata.move.model;

// Generated cafuc by Hibernate Tools 4

import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * StopFlyOpinion generated by hbm2java
 */
@Entity
@Table(name = "stop_fly_opinion")
public class StopFlyOpinion implements java.io.Serializable {

	private Long id;
	private StopFly stopFly;
	private Long userId;
	private String opinion;
	private Date createDate;
	private byte types;
	private byte agree;

	public StopFlyOpinion() {
	}

	public StopFlyOpinion(byte types, byte agree) {
		this.types = types;
		this.agree = agree;
	}

	public StopFlyOpinion(StopFly stopFly, Long userId, String opinion,
			Date createDate, byte types, byte agree) {
		this.stopFly = stopFly;
		this.userId = userId;
		this.opinion = opinion;
		this.createDate = createDate;
		this.types = types;
		this.agree = agree;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "ID", unique = true, nullable = false)
	public Long getId() {
		return this.id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "STOP_FLY_ID")
	public StopFly getStopFly() {
		return this.stopFly;
	}

	public void setStopFly(StopFly stopFly) {
		this.stopFly = stopFly;
	}

	@Column(name = "USER_ID")
	public Long getUserId() {
		return this.userId;
	}

	public void setUserId(Long userId) {
		this.userId = userId;
	}

	@Column(name = "OPINION", length = 65535)
	public String getOpinion() {
		return this.opinion;
	}

	public void setOpinion(String opinion) {
		this.opinion = opinion;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "CREATE_DATE", length = 19)
	public Date getCreateDate() {
		return this.createDate;
	}

	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}

	@Column(name = "TYPES", nullable = false)
	public byte getTypes() {
		return this.types;
	}

	public void setTypes(byte types) {
		this.types = types;
	}

	@Column(name = "AGREE", nullable = false)
	public byte getAgree() {
		return this.agree;
	}

	public void setAgree(byte agree) {
		this.agree = agree;
	}

}
